﻿<phone:PhoneApplicationPage x:Class="Caliburn.Micro.HelloWindowManagerWP71.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
                            mc:Ignorable="d"
                            d:DesignWidth="480"
                            d:DesignHeight="768"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait"
                            Orientation="Portrait"
                            shell:SystemTray.IsVisible="True"
                            x:Name="thePage">
  <Grid Background="RoyalBlue">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
      <RowDefinition Height="*" />
      <RowDefinition Height="*" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <StackPanel Grid.Row="0">
      <TextBlock Text="WP7 Caliburn.Micro"
                 Style="{StaticResource PhoneTextExtraLargeStyle}" />
    </StackPanel>

    <Grid Grid.Row="1">
      <Button x:Name="ShowMessageAsPopup"
              Content="Show message as popup"
              Background="SlateGray">
      </Button>
    </Grid>
    <Grid Grid.Row="2">
      <Button x:Name="ShowMessageAsDialog"
              Content="Show message as dialog"
              Background="SlateGray">
      </Button>
    </Grid>
    <Grid Grid.Row="3">
      <Button x:Name="ShowInputDialog"
              Content="Show input dialog"
              Background="SlateGray">
      </Button>
    </Grid>

    <Grid Grid.Row="4">
      <CheckBox IsChecked="{Binding Path=(shell:SystemTray.IsVisible), ElementName=thePage, Mode=TwoWay}"
                Content="Show system tray" />
    </Grid>
    <Grid Grid.Row="5">
      <CheckBox IsChecked="{Binding ApplicationBar.IsVisible, ElementName=thePage, Mode=TwoWay}"
                Content="Show application bar" />
    </Grid>
  </Grid>

  <phone:PhoneApplicationPage.ApplicationBar>
    <shell:ApplicationBar IsVisible="True">
      <shell:ApplicationBar.Buttons>
        <cal:AppBarButton IconUri="ApplicationIcon.png"
                          Text="input"
                          Message="ShowInputDialog" />

        <cal:AppBarButton IconUri="ApplicationIcon.png"
                          Text="message"
                          Message="ShowMessageBox" />
      </shell:ApplicationBar.Buttons>
      <shell:ApplicationBar.MenuItems>
        <shell:ApplicationBarMenuItem Text="Dummy 1" />
        <shell:ApplicationBarMenuItem Text="Dummy 2" />
      </shell:ApplicationBar.MenuItems>
    </shell:ApplicationBar>
  </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>